import service from '@/utils/request.js'

const doctorApi = {
    list(doctorQuery) {
        return service.get('/admin/doctorlist', {params: doctorQuery})
    },
    deleteById(id) {
        return service.delete(`/admin/deleteById/${id}`)
    },
    deleteAll(ids) {
        return service.delete( `/admin/deleteAll/${ids}`)
    },
    add(doctor) {
        //doctor以JSON形式传递到后台，后端使用@RequestBody接收
        return service.post('/admin/doctoradd', doctor)
    },
    selectById(id) {
        return service.get(`/admin/selectById/${id}`)
    },
    update(doctor) {
        return service.put('/admin/update', doctor)
    },
    selectAll() {
        return service.get(`/admin/selectAll`)
    },
    selectNotAll() {
        return service.get(`/admin/selectNotAll`)
    }
}

export default doctorApi